package com.xpqh.ksg.modular.store.controller;

import com.xpqh.ksg.base.BaseController;
import com.xpqh.ksg.base.BaseResponseDTO;
import com.xpqh.ksg.modular.store.dto.KsgStoreListReqDTO;
import com.xpqh.ksg.modular.store.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/ksg/store")
public class StoreController extends BaseController {

    @Autowired
    private StoreService storeService;
    @PostMapping("/list")
    public BaseResponseDTO list(@Valid @RequestBody KsgStoreListReqDTO req) {

        return renderResultOk(storeService.getStoreInfoList(req));
    }
}

